<template>
  <div>
    <a-modal v-model:visible="itemModal.visible" :title="itemModal.title" :destroy-on-close="true" @ok="itemModal.ok">
      <slot />
    </a-modal>
  </div>
</template>
<script lang="ts">
import { defineComponent, toRef } from 'vue'
export default defineComponent({
  name: 'RHModal',
  props: {
    modal: {
      type: Object,
      required: true
    }
  },
  setup(props) {
    const itemModal = toRef(props, 'modal')
    return {
      itemModal
    }
  }
})
</script>

